package com.ys.service.sys;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.multipart.MultipartFile;

import com.ys.vo.R;

import lombok.AllArgsConstructor;
import lombok.Data;

public interface UploadService {
	@Data
	@AllArgsConstructor
	public static class UploadDto {
		private String url; // 文件链接地址
	}

    R uploadfileForEditor(HttpServletRequest request, HttpServletResponse response, MultipartFile file, String moduleFile) throws IOException;

    R uploadfileForLayer(HttpServletResponse response, MultipartFile file, String moduleFile) throws IOException;

    R uploadBase64(String body) throws IOException;

    R uploadByUrl(String urlOld, String moduleFile) throws IOException;

    R uploadfileFor1_0(MultipartFile file, String moduleFile) throws IOException;
	
	@Data
	@AllArgsConstructor
	public static class Upload1_0Dto {
		private String fileSize;
		private String fileType;
		private String fileName;
		private String fileSizeUnit;
		private String filePath;
		private Long fileSizeLong;
	}
}
